diff options
Diffstat (limited to 'app/[lng]/evcp/(evcp)/(procurement)/bid/[id]/info/page.tsx')
| -rw-r--r-- | app/[lng]/evcp/(evcp)/(procurement)/bid/[id]/info/page.tsx | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/app/[lng]/evcp/(evcp)/(procurement)/bid/[id]/info/page.tsx b/app/[lng]/evcp/(evcp)/(procurement)/bid/[id]/info/page.tsx new file mode 100644 index 00000000..7281d206 --- /dev/null +++ b/app/[lng]/evcp/(evcp)/(procurement)/bid/[id]/info/page.tsx @@ -0,0 +1,75 @@ +import { notFound } from 'next/navigation' +import { getBiddingById } from "@/lib/bidding/service" +import { Bidding } from "@/db/schema/bidding" +import { Button } from "@/components/ui/button" +import { ArrowLeft } from "lucide-react" +import Link from "next/link" +import { BiddingBasicInfoEditor } from "@/components/bidding/manage/bidding-basic-info-editor" +import { BiddingTabs } from "../bidding-tabs" + +// 메타데이터 생성 +export async function generateMetadata({ params }: { params: Promise<{ lng: string; id: string }> }) { + const { id } = await params + const parsedId = parseInt(id) + if (isNaN(parsedId)) return { title: '입찰 기본 정보 관리' } + + try { + const bidding = await getBiddingById(parsedId) + return { + title: bidding ? `${bidding.title} - 입찰 기본 정보 관리` : '입찰 기본 정보 관리', + } + } catch { + return { title: '입찰 기본 정보 관리' } + } +} + +interface PageProps { + params: Promise<{ lng: string; id: string }> +} + +export default async function BiddingBasicInfoPage({ params }: PageProps) { + const { lng, id } = await params + const parsedId = parseInt(id) + + if (isNaN(parsedId)) { + notFound() + } + + const bidding: Bidding | null = await getBiddingById(parsedId) + + if (!bidding) { + notFound() + } + + return ( + <div className="container py-6 space-y-6"> + {/* 헤더 */} + <div className="flex justify-between items-center"> + <div className="flex items-center gap-4"> + <div> + <h1 className="text-3xl font-bold tracking-tight"> + 입찰 기본 정보 관리 + </h1> + <p className="text-muted-foreground mt-2"> + 입찰 No. {bidding.biddingNumber ?? ""} - {bidding.title} + </p> + </div> + </div> + <Link href={`/${lng}/evcp/bid/${id}`} passHref> + <Button variant="outline" className="flex items-center"> + <ArrowLeft className="mr-2 h-4 w-4" /> + 입찰 관리로 돌아가기 + </Button> + </Link> + </div> + + {/* 탭 네비게이션 */} + <div> + <BiddingTabs id={id} /> + </div> + + {/* 입찰 기본 정보 에디터 */} + <BiddingBasicInfoEditor biddingId={parsedId} /> + </div> + ) +} |
